﻿#pragma once

#include "Types.h"
#include <vtkm/cont/DataSet.h>

class Mesh;

namespace libMesh
{
class MeshBase;
}

namespace MeshTool
{

/// @brief 由Cell和Point信息，构建Face的拓扑关系
/// @param input mesh
void AttachBoundaryCondition(Mesh& mesh, const std::map<std::string, BCType>& bnd_name_id);
void Build(Mesh& mesh, libMesh::MeshBase& other);

void BuildCellLinks(Mesh& mesh);

vtkm::cont::DataSet CreateStructuredMesh(const Id2& point_dim,
                                         const Vec2f& orign,
                                         const Vec2f& space);

vtkm::cont::DataSet CreateStructuredMesh(const Id3& point_dim,
                                         const Vec3f& orign,
                                         const Vec3f& space);
void CreateUnstructuredMesh();

/// @brief 三角化网格
/// @param mesh
void TriangulateMesh(Mesh& mesh);
}



namespace MeshTool
{
// 从第三方中的Mesh中构建
//void Build(Mesh& mesh, const libMesh::MeshBase& other);
//
//
//// 按照后缀，从文件中解析构建
//void Build(Mesh& mesh, const std::string& file);
//
//
//// 参数构建
//void Build(Mesh& mesh, const const Id3& point_dim, const Vec3f& orign, const Vec3f& space);
}